//
//  PRHTTPRequest.h
//  WeChat
//
//  Created by WebersonGao on 2017/10/19.
//  Copyright © 2017年 WebersonGao. All rights reserved.
//  网络服务层 - 请求

#import <Foundation/Foundation.h>
#import "PRURLParameters.h"
#import "PRHTTPResponse.h"
#import <AFNetworking/AFNetworking.h>
@interface PRHTTPRequest : NSObject
/// 请求参数
@property (nonatomic, readonly, strong) PRURLParameters *urlParameters;
/**
 获取请求类
 @param params  参数模型
 @return 请求类
 */
+(instancetype)requestWithParameters:(PRURLParameters *)parameters;
-(instancetype)initRequestWithParameters:(PRURLParameters *)parameters;

@end

/// PRHTTPService的分类
@interface PRHTTPRequest (PRHTTPService)

-(NSURLSessionDataTask *)enqueueResultClass:(Class /*subclass of PRDiskObject*/) resultClass
                               parsedResult:(BOOL)parsedResult
                                    success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                    failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;

@end
